import developmentapi from './config/api_development.js'
import productionapi from './config/api_production.js'
import testapi from './config/api_test.js'
import localhostapi from './config/api_localhost.js'
import stageapi from './config/api_stage.js'
let url
if (process.env.REACT_APP_MODE === 'development') {
  console.log('开发环境')
  url = developmentapi
} else if (process.env.REACT_APP_MODE === 'production') {
  console.log('生产环境')
  url = productionapi
} else if (process.env.REACT_APP_MODE === 'test') {
  console.log('测试环境')
  url = testapi
} else if (process.env.REACT_APP_MODE === 'localhost') {
  console.log('localhost环境')
  url = localhostapi
} else if (process.env.REACT_APP_MODE === 'stage') {
  console.log('stage环境')
  url = stageapi
}

export default url
